<template>
  <page-header-wrapper :title="false" >
    <a-card>
      <div class="table-operator">
        <a-button type="primary" @click="handleEdit()">批量添加权限</a-button> 
        <a-button type="danger" @click="handleEdit()">批量去除权限</a-button>    
      </div>
    </a-card>
    <a-card title="公共权限 (适用于所有店面)">
      <a-row v-for="(item,i) in loadData" :key="i">
        <a-card :title="item?.name">
          <div v-for="(itm,idx) in item?.children" :key="idx">
            <a-col :span="6">
              <a @click="handle(itm?.name)">{{ itm.name }}</a>
            </a-col>
          </div>
        </a-card>
      </a-row >
    
    </a-card>
    <a-card title="店面权限 (仅店面拥有的权限)">
      <a-row v-for="(item,i) in loadData1" :key="i">
        <a-card :title="item?.name">
          <div v-for="(itm,idx) in item?.children" :key="idx">
            <a-col :span="6">
              <a href="">{{ itm.name }}</a>
            </a-col>
          </div>
        </a-card>
      </a-row >
    
    </a-card>
  </page-header-wrapper>
</template>

<script>
export default {
  name: 'CompetenceSettingIndex',
  components: {
  
  },
  data () {
    return {
      loadData: [
        {
          name:'店面权限',
          children:[
            {
              name:'店面列表'
            },
            {
              name:'编辑店面'
            },
          ]
        }, {
          name:'员工权限',
          children:[
            {
              name:'员工列表'
            },
            {
              name:'标记员工'
            },
            {
              name:'重置密码'
            },
            {
              name:'权限设置'
            },
            {
              name:'职务管理'
            }
          ]
        },
        {
          name:'供应商权限',
          children:[
            {
              name:'供应商列表'
            },
            {
              name:'编辑供应商'
            },
            {
              name:'供应商往来账'
            },
            {
              name:'账户初始余额'
            },
            {
              name:'记录应收应付'
            },
            {
              name:'查看供应商'
            }
          ]
        },
        {
          name:'商品权限',
          children:[
            {
              name:'商品管理'
            },
            {
              name:'商品采购统计'
            },
            {
              name:'商品销售统计'
            },
            {
              name:'查看商品成本'
            },
            {
              name:'查看考核成本'
            },
            {
              name:'查看价格表'
            },
            {
              name:'自动新增商品名'
            },
            {
              name:'商品批发统计'
            },
            {
              name:'商品保价'
            },
            {
              name:'商品调价'
            },
            {
              name:'商品售前返厂'
            },
            {
              name:'商品售前返厂管理'
            },
            {
              name:'礼品赠送统计'
            },
            {
              name:'商品报废损失'
            },
            {
              name:'商品周转分析'
            },
            {
              name:'销售趋势看板'
            },
            {
              name:'超龄库存统计'
            },
            {
              name:'超龄库存设置'
            },
            {
              name:'渠道管理'
            }
          ]
        },
        {
          name:'运营商业务权限',
          children:[
            {
              name:'业务分类管理'
            },
            {
              name:'业务列表'
            },
            {
              name:'业务编辑'
            },
            {
              name:'运营商业务统计'
            },
            {
              name:'查看酬金'
            },
            {
              name:'查看积分'
            }
          ]
        }, {
          name:'售后权限',
          children:[
            {
              name:'售后业务管理'
            },
            {
              name:'售后供应商'
            },
            {
              name:'售后供应商往来账'
            },
            {
              name:'售后统计'
            },
            {
              name:'撤销售后'
            }
          ]
        },{
          name:'商城权限',
          children:[
            {
              name:'网上商城'
            },
            {
              name:'商品管理'
            },
            {
              name:'商品上下架'
            },
            {
              name:'商城首页设置'
            },
            {
              name:'商城更多设置'
            },
            {
              name:'订单查看'
            },
            {
              name:'订单操作'
            },
            {
              name:'订单撤销'
            },
            {
              name:'商城设置'
            }
          ]
        },{
          name:'会员权限',
          children:[
            {
              name:'查看会员'
            },
            {
              name:'编辑会员'
            },
            {
              name:'变更积分'
            },
            {
              name:'撤销变更积分'
            },
            {
              name:'客服经理'
            },
            {
              name:'会员跟进统计'
            },
            {
              name:'删除会员跟进'
            },
            {
              name:'会员通知'
            },
          ]
        },{
          name:'二手回收权限',
          children:[
            {
              name:'回收商结算价'
            },
            {
              name:'回收加价'
            },
            {
              name:'回收日报详情'
            },
            {
              name:'运单管理'
            },
            {
              name:'回收设置'
            },
            {
              name:'回收报表'
            },
            {
              name:'优品采购'
            },
            {
              name:'回收高级设置'
            },
            {
              name:'回收管理'
            },
            {
              name:'油品商城'
            }
          ]
        },{
          name:'财务权限',
          children:[
            {
              name:'前台'
            },
            {
              name:'财务'
            },
            {
              name:'债务管理'
            },
            {
              name:'长期待摊费用管理'
            },
            {
              name:'股东管理'
            },
            {
              name:'高级销售下单'
            },
            {
              name:'审核'
            },
            {
              name:'反审核'
            },
            {
              name:'押金管理'
            },
            {
              name:'编辑销售订单'
            },
            {
              name:'撤销订单记录'
            },
            {
              name:'预付款统计'
            },
            {
              name:'编辑零售价'
            }
          ]
        },{
          name:'系统设置权限',
          children:[
            {
              name:'公告设置'
            },
            {
              name:'手指类型设置'
            },
            {
              name:'收款方式管理'
            },
            {
              name:'分摊设置'
            },
            {
              name:'打印设置'
            },
            {
              name:'企业微信设置'
            },
            {
              name:'叮叮设置'
            },
            {
              name:'微信设置'
            },
            {
              name:'消息设置'
            },
            {
              name:'积分设置'
            },
            {
              name:'区域设置'
            },
            {
              name:'会员标签'
            },
            {
              name:'期初库存'
            },
            {
              name:'自动审核'
            },
            {
              name:'安全设置'
            },
            {
              name:'自动编码规则设置'
            }
          ]
        },{
          name:'其他权限',
          children:[
            {
              name:'工资设置'
            },
            {
              name:'数据导出'
            },
          ]
        }
      ],
      loadData1: [
        {
          name:'达臻贸易王升',
          children:[
            {
              name:'销售下单'
            },
            {
              name:'销售记录'
            },
            {
              name:'回收下单'
            },
            {
              name:'客情赠送'
            },{
              name:'调库'
            },{
              name:'回收记录'
            },{
              name:'调价调库'
            },{
              name:'回收库存'
            },{
              name:'回收调库'
            },{
              name:'销售统计'
            },{
              name:'查看工资'
            },{
              name:'编辑工资'
            },{
              name:'利润表'
            },{
              name:'经营日报'
            },{
              name:'补打票据'
            },{
              name:'批发出库'
            },{
              name:'出库记录'
            },{
              name:'批发退库'
            },
          ]
        },{
          name:'达臻东街店',
          children:[
            {
              name:'销售下单'
            },
            {
              name:'销售记录'
            },
            {
              name:'回收下单'
            },
            {
              name:'客情赠送'
            },{
              name:'调库'
            },{
              name:'回收记录'
            },{
              name:'调价调库'
            },{
              name:'回收库存'
            },{
              name:'回收调库'
            },{
              name:'销售统计'
            },{
              name:'查看工资'
            },{
              name:'编辑工资'
            },{
              name:'利润表'
            },{
              name:'经营日报'
            },{
              name:'补打票据'
            },{
              name:'批发出库'
            },{
              name:'出库记录'
            },{
              name:'批发退库'
            },
          ]
        }
      ],
    }
  },
  methods: {
    handle(itm){
      this.$router.push({ path: `/user/competenceSetting/${itm}` })
    }
  }
}
</script>